define([''],function () {
    return {
        path: '/test',
        name: 'test',
        params: {},//对象，包含路由中的动态片段和全匹配片段的键值对
        query: {},//对象，包含路由中查询参数的键值对。
        matched: {},//数组，包含当前匹配的路径中所包含的所有片段所对应的配置参数对象。
        //redirect:'/b',//重定向
        component: function (resolve) {
            const Foo = {
                template:get('vue/test.vue').responseText,
                props:['list'],
                data: function () {
                    return {
                        name: 'test',
                        a: 444
                    }
                },
                methods: {
                    dianwo: function () {
                        console.log('点我干啥...');
                    },
                    fetchData:function () {
                        this.name = 777;
                    },
                    css:function () {
                        require(['css!../test/css.css'],function (css) {
                            layer.alert('这是你引进来的css~~~,屏幕变黑了吧~~~,刷新一下','',function () {
                                location.reload();
                            });
                        })
                    },
                    js:function () {
                        require(['test/js.js'],function (js) {
                            console.log(js);
                        })
                    },
                    html:function () {
                        require(['text!../test/html.html'],function (html) {
                            layer.alert('这是你引进来的html~~~'+html);
                        })
                    },
                    text:function () {
                        require(['text!../test/text'],function (text) {
                            layer.alert('这是你引进来的text~~~'+text);
                        })
                    }
                },
                created:function () {
                    console.log('created==test');
                    console.log(this.a);
                },
                beforeRouteEnter:function (to, from, next) {
                    console.log(to);
                    next();
                },
                computed: {}
            };
            resolve(Foo);
        },
        //子路由
        subRoutes: {
            '/news': {},
            '/message': {}
        }
    }
});
